package com.lc.user.express.my;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.lc.user.express.BaseSecondActivity;
import com.lc.user.express.R;
import com.lc.user.express.app.AppManager;
import com.lc.user.express.utils.PublicMethod;



/**
 * Created by Administrator on 2016/4/11.充值成功
 */
public class RechargeResultActivity extends BaseSecondActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_recharge_result);
        setTitle("充值");
        initView();
    }

    private void initView() {
        ((TextView) findViewById(R.id.tv_bankname)).setText(getIntent().getStringExtra("bankname"));
        ((TextView) findViewById(R.id.tv_number)).setText("尾号" + getIntent().getStringExtra("banknum"));
        ((TextView) findViewById(R.id.tv_money)).setText(String.format("%.2f", PublicMethod.strToDouble(getIntent().getStringExtra("money"))) + "元");
        ((TextView) findViewById(R.id.tv_public)).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                AppManager.getAppManager().finishActivity(RechargeActivity.class);
                finish();
            }
        });
    }

    @Override
    public void onBackPressed() {
        AppManager.getAppManager().finishActivity(RechargeActivity.class);
        finish();
    }
}
